package com.xianyun.site.support;

import com.alibaba.cola.dto.Response;
import com.xianyun.site.support.api.dubbo.SupportEchoService;
import com.xianyun.site.support.dto.SmsCheckQry;
import com.xianyun.site.support.dto.SmtpCheckQry;
import com.xianyun.site.support.executor.query.SmsCheckQryExe;
import com.xianyun.site.support.executor.query.SmtpCheckQryExe;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 数据支撑 Dubbo 对外暴露接口实现
 * @author mac_zyj
 */
@Service
@Component
public class SupportEchoServiceImpl implements SupportEchoService {

    @Autowired
    private SmsCheckQryExe smsCheckQryExe;

    @Autowired
    private SmtpCheckQryExe smtpCheckQryExe;

    @Override
    public Response checkSmtpCode(SmtpCheckQry smtpCheckQry) {
        return smtpCheckQryExe.execute(smtpCheckQry);
    }

    @Override
    public Response checkSmsCode(SmsCheckQry smsCheckQry) {
        return smsCheckQryExe.execute(smsCheckQry);
    }
}
